package com.bootdo.market.service.impl;

import com.bootdo.market.dao.ChannelDao;
import com.bootdo.market.dao.CommonDao;
import com.bootdo.market.domain.ChannelDO;
import com.bootdo.market.service.ChannelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service
public class ChannelServiceImpl implements ChannelService {
    @Autowired
    private ChannelDao channelDao;
    @Autowired
    private CommonDao commonDao;


    @Override
    public ChannelDO get(Integer id) {
        return channelDao.get(id);
    }

    @Override
    public List<ChannelDO> list(Map<String, Object> map) {
        return channelDao.list(map);
    }

    @Override
    public int count(Map<String, Object> map) {
        return channelDao.count(map);
    }

    @Override
    public int save(ChannelDO channel) {
        return channelDao.save(channel);
    }

    @Override
    public int update(ChannelDO channel) {
        return channelDao.update(channel);
    }

    @Override
    public int remove(Integer id) {
        return channelDao.remove(id);
    }

    @Override
    public int batchRemove(Integer[] ids) {
        return channelDao.batchRemove(ids);
    }

    @Override
    public List<Map<String, Object>> listAllChannel() {
        return commonDao.list();
    }

}
